Added error handling for args