Fixed chmod 777 with umask(0)