Certain error handling implemented

Updated with some error handling in the form of dialog boxes