Added calling with argument
Return -1 and stop on error
Changed if to try satement