fixed file creation if not exist