fixed some issues on resourceHandler
added error messages to logs