Removing unused functions
On errot complain and exit