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
Yes I did, thanks. Actually emacs does not have an in-built lua mode, so the indentation was going awry. Even diff can also be used to check white-spaces and other formatting.