error handling for atom format