Added rsync error handling and modified WARN and ERROR functions to print to
stderr