Using utils functions
Merge pull request #7 from alemela/hackathon_nodeg3

Created utils function to manage errors