Added logging of bad request
Adding more fault tolerance