Added schedule
Fixed write directory
Merge branch 'schedule'