File creation bug fixed