ignore pyc files
added error handling