Correlation between structure and magnetic transport mechanisms in YBCO films