Now checking, if file handle is valid before doing operations.
Fixed missing argument checks in logger (fixed crashed on android)
Fixed log level setting on android.
Implemented setting of debug level.