changed to properly close the file
changed @file to file
added file_output.rb
added spec for file_output.rb