fixed error with file saves and logged errors added now