A better error handling..I hope