Removed useless require and improper error management.