Fixed compile bug, writing new file to dirent now