fix inaccurate file detection. is_readable changed to is_file
implement warn()