fixed error handling

 `__filename`