Fixed bugs with file access, added time to log