Cleanup for error output. Removed debug prints.