Getting file opening and saving fully working