fixed file loading problems with different newlines