Change error handling, remvoe unnecessary files