fixed error detection and made main()/init() only place to find //android: