Added traceback and extra check for missing location