REFACTOR: substituted the constants
Added status messages and code to handle exceptions