Updated chmod permissions.  Updated error handling in model