added check if file_exist