Add test and fix problems with file writing
Clean compile