try catch and basedir changes