Fix issue regarding the error message when updating an entry

* Added a check to see if `ul` command was successful.
* Break process if unproductive

Ref.: HiT-Hi-FiT-Hai/hhfh-issues#20
@nishithshah2211 Nearly all editors have the option to trim white-spaces these days. Search around on how to enable it.