Fix non-absolute/non-nested imports
Output to the correct file
Include file-level annotations