Added helper functions for output. Delay error in output.