Fixed typo; Added some error handling to nanocalc.