Added test to check a file is opened correctly before being saved