Moving commands line outside of try catch to let only file open errors be captured.