OPT: add file existence and input parameters checks