Writint to log and fixed error