Move file init code to file module