Catch OperationFailure on applying operation
Catch InvalidDocument errors
Moved logging initializtion to a separate function
Save last processed timestamp in file and resume from it.
Set version 0.4
Added --host switch as an alias for --host