Fixed incorrect path
Added log and error handling