change file flag to 'f', fix import emit