add umask constant and file_mode calculation