Fix & error logging