need to include sys/stat.h for umask()
avoid control reaches end of non-void function error