fixed file IO, UI