Fixed several bugs, starting implementing better filewatcher