fixed file loading/saving and mapped it to buttons