Refactor: now is using promises
use promises
Created file module