Fixed error handling
Removed obsolete options