Add phase information to error logger